package club.pchome.controller;

import club.pchome.common.util.RedisUtil;
import club.pchome.dto.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录注册相关控制
 */
@RestController
@RequestMapping("/manage")
public class LoginController extends BaseController {



    /**
     *
     * @return
     */
    @PostMapping("/login")
    public Result<String> adminLogin(String userName, String passwd){

        redisUtil.set("userName" , "13076906186");
        redisUtil.expire("userName" , 30);
        return Result.initSuccessResult("ok");
    }

}
